package inutan.game.action;

import inutan.common.constant.DataConstant;
import inutan.game.business.GameFlowContext;
import inutan.game.service.AchievementService;
import luban.common.Command;
import org.ricks.ioc.anno.Action;
import org.ricks.ioc.anno.ActionMethod;
import org.ricks.ioc.anno.Autowired;

@Action(modularId = 1)
public class AchievementController {

    @Autowired
    private AchievementService achievementService;

    /**
    * @Explain --> 获得成就信息
    * @Author yanwang
    * @Date 2023/5/19 13:36
    **/
    @ActionMethod(cmd = Command.GetAchievements)
    public void getAchievements(GameFlowContext context){
        context.sendResponse(DataConstant.BROADCAST_MESSAGE,Command.GetAchievements, achievementService.getAchieveList(context.getUserId())); //成就信息
    }
}
